/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hibernate.entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author ariel
 */
@Embeddable
public class DetallePedCliPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "cod_ped_cli")
    private int codPedCli;
    @Basic(optional = false)
    @Column(name = "linea")
    private short linea;

    public DetallePedCliPK() {
    }

    public DetallePedCliPK(int codPedCli, short linea) {
        this.codPedCli = codPedCli;
        this.linea = linea;
    }

    public int getCodPedCli() {
        return codPedCli;
    }

    public void setCodPedCli(int codPedCli) {
        this.codPedCli = codPedCli;
    }

    public short getLinea() {
        return linea;
    }

    public void setLinea(short linea) {
        this.linea = linea;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) codPedCli;
        hash += (int) linea;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DetallePedCliPK)) {
            return false;
        }
        DetallePedCliPK other = (DetallePedCliPK) object;
        if (this.codPedCli != other.codPedCli) {
            return false;
        }
        if (this.linea != other.linea) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "hibernate.entidades.DetallePedCliPK[ codPedCli=" + codPedCli + ", linea=" + linea + " ]";
    }
    
}
